/*LICENSE_BEGIN
 * ******************************************************************
 * All original parts of SoccerScope2003 have copyright (2003) by
 * Team YowAI, represented by Mr. Shuhei Shiota
 * The Department of Creative Informatics
 * The Graduate School of Information Science and Technology
 * The University of Tokyo
 * 
 * Additional classes (except libraries in /lib) were developed by 
 * the Dainamite Robocup-Team of the DAI-Labor, TU-Berlin 
 * (www.dai-labor.de)
 * 
 * Extended/new classes/packages are:
 *   soccerscope.analyzer.LogfileAnalyzer
 *   soccerscope.daistatistic.*
 *   soccerscope.daistatistic.charts.*
 *   soccerscope.daistatistic.tools.*
 *   soccerscope.db.*
 *   soccerscope.dialog.*
 *   soccerscope.model.PlayerWorldModel
 *   soccerscope.model.SimplePlayer
 *   soccerscope.net.AgentConnector
 *   soccerscope.training.*
 *   soccerscope.training.conditions.*
 * ******************************************************************
LICENSE_END*/
package soccerscope.model.agentplan;

import soccerscope.model.ClientScene;
import soccerscope.model.SceneSet;
import soccerscope.model.WorldModel;

public class AgentPlan {

	private int time; // cycle of plan

	private int unum; // player number

	private int level; // ???

	private AgentPlanCommand command; // command which agent wants to do next

	// <AgentPlan>:=<Time> <Unum> <Level> <Command>
	public void parse(Context context) throws ParseException {
		this.time = context.currentNumber();
		context.nextToken();
		this.unum = context.currentNumber();
		context.nextToken();
		this.level = context.currentNumber();
		context.nextToken();
		this.command = new AgentPlanCommand(this.level, this.unum);
		WorldModel wm = WorldModel.getInstance();
		SceneSet sceneSet = wm.getSceneSet();
		this.command.parse(context, (ClientScene) sceneSet.getScene(this.time));
	}

	public int getTime() {
		return this.time;
	}

	public int getUnum() {
		return this.unum;
	}

	public int getLevel() {
		return this.level;
	}

	public AgentPlanCommand getAgentPlanCommand() {
		return this.command;
	}
}
